package search.backup.filter;

import org.codehaus.jettison.json.JSONException;
import search.service.graph.JavaGraphOp;

import javax.ws.rs.core.UriInfo;

/**
 * This class handles the HTTP requests.
 */
//@Path("/titandb")
//@Component
public class TitanWebServiceExample {

    //@Autowired
    //GroovyGraphOp groovyOp;

    //@Autowired
    JavaGraphOp javaOp;

    //@PostConstruct
    private void init() {
        System.out.println("Initialized Titan Web Example Service");
    }

    //@GET
   // @Path("/listVertices")
    //@Produces(MediaType.TEXT_PLAIN)
    public String listVertices(//@Context
                                       UriInfo info) throws JSONException {
        System.out.println("In ListVertices");
        String res = javaOp.listVertices();
        return "\"" + res + "\"";
    }

    //@GET
    //@Path("/plutosBrothers")
    //@Produces(MediaType.TEXT_PLAIN)
    public String pipeline(//@Context
                                   UriInfo info) throws JSONException {
        System.out.println("In plutosBrothers");
        //String res = groovyOp.getPlutosBrothers();
        //return "\"" + res + "\"";
        return "{}";
    }
}
